Skip to content

Glasgow | Mansoor Munawar | Structuring and Testing Data | Sprint 3 #662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 18 commits into from

Conversation

MansoorM11
Copy link

Learners, PR Template

Self checklist

  • [y ] I have committed my files one by one, on purpose, and for a reason
  • [y ] I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • [y ] I have tested my changes
  • [y ] My changes follow the style guide
  • [y ] My changes meet the requirements of this task

Changelist

Briefly explain your PR.
I have completed the task for sprint 3 which required me to create test using Jest and implement functions to solve the required problems.

Questions

Ask any questions you have for your reviewer.

@MansoorM11 MansoorM11 added the Needs Review Participant to add when requesting review label Jul 16, 2025
@LonMcGregor LonMcGregor added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Jul 17, 2025
Copy link

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Mansoor, good work on this sprint. I've left comments about 2 small issues in two files for you to look at.

if (Math.abs(numerator) < Math.abs(denominator)) return true;
else if (numerator === denominator) return false;
else if (numerator > denominator) return false;
else return false;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you see any way you could combine these 3 return false conditions into one line?

// Handle Ace (A):
// Given a card with a rank of "A",
// When the function is called with an Ace,
// Then it should, by default, assume the Ace is worth 11 points, which is a common rule in blackjack.

const aceOfHearts = getCardValue("A♥");
assertEquals(aceOfSpades, 11);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you may have made a typo here that invalidates this test. Which variables are you trying to test for on this line?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback. I've now made the requested changes.

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review and removed Needs Review Participant to add when requesting review Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jul 17, 2025
@MansoorM11 MansoorM11 added Needs Review Participant to add when requesting review and removed Reviewed Volunteer to add when completing a review labels Jul 18, 2025
@LonMcGregor
Copy link

Good work on this sprint - you can close this and move to the next one

@LonMcGregor LonMcGregor added Complete Volunteer to add when work is complete and review comments have been addressed and removed Needs Review Participant to add when requesting review labels Jul 18, 2025
@MansoorM11 MansoorM11 closed this Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complete Volunteer to add when work is complete and review comments have been addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants